import Api from "/@/api/Api";
import ApiConfig from "/@/api/ApiConfig";



export default class LoginApi extends Api {
    static login(login: LoginTypes) {
        return this.post({
            url: ApiConfig.AUTH.LOGIN,
            data: login,
        });
    }

    static getRouter() {
        return this.post({
            url: ApiConfig.AUTH.ROUTER,
        });
    }
}
export interface LoginTypes{
    /**
     * 账号
     */
    username :string
    /**
     * 密码
     */
    password :string
    /**
     * 登录类型
     */
    loginType :'passwordLogin'|'emailLogin'
}